package algorithm.interview.ali;

public class ali {
    public static int getValue(int num) {
        if (num == 0 || num == 1)
            return 1;
        return process(1, 1, num-2);
    }

    private static int process(int a, int b, int limit) {
        if (limit == 0) {
            return a+b;
        }
        return process(b, a+b, limit-1);
    }

    public static void main(String[] args) {
        for (int i = 0; i < 20; i++)
            System.out.println(getValue(i));
    }
}
